﻿'******************************************************
'******************************************************
'Application Title: Google Widget Editor
'version: 1.0
'Date: 01-02-2008
'Requirements: win2k or later
'Author: Andrew Pye
'Author Email: StretchMasterP@googlemail.com
'License: Released under GNU GENERAL PUBLIC LICENSE v3
'ToDo:
'Changes:Imports System.Text
'******************************************************
'******************************************************

''' <summary>
''' Holds our class object in the tree
''' </summary>
''' <remarks></remarks>
Public Class ClassContainer
#Region "Enum"
    'Enum for the type of data
    Public Enum enumClassType
        None
        CodeSnippet
        CodeSnippets
        Content
        Contents
        [Enum]
        [Module]
        ModulePrefs
        RequireLibs
        Require
        UserPref
        UserPrefs
        Application
        oAuth
    End Enum
#End Region
#Region "Fields"
    Private _Expanded As Boolean = False
    Private _CanDelete As Boolean = False
    Private _Name As String = String.Empty
    Private _HelpPage As String = String.Empty
    Private _ClassType As enumClassType = enumClassType.None
    Private _ClassObject As Object = Nothing
#End Region
#Region "Constructor"
    Public Sub New()
    End Sub
    Public Sub New(ByVal ClassObject As Object, ByVal ClassType As enumClassType, ByVal CanDelete As Boolean)
        Me.ClassObject = ClassObject
        Me.ClassType = ClassType
        Me.CanDelete = CanDelete
    End Sub
    Public Sub New(ByVal ClassObject As Object, ByVal ClassType As enumClassType, ByVal HelpPage As String, ByVal CanDelete As Boolean)
        Me.ClassObject = ClassObject
        Me.ClassType = ClassType
        Me.HelpPage = HelpPage
        Me.CanDelete = CanDelete
    End Sub

#End Region
#Region "Properties"
    Public Property CanDelete() As Boolean
        Get
            Return _CanDelete
        End Get
        Set(ByVal value As Boolean)
            _CanDelete = value
        End Set
    End Property
    Public Property Expanded() As Boolean
        Get
            Return _ClassObject
        End Get
        Set(ByVal value As Boolean)
            _Expanded = value
        End Set
    End Property
    Public Property HelpPage() As String
        Get
            Return _HelpPage
        End Get
        Set(ByVal value As String)
            _HelpPage = value
        End Set
    End Property
    Public ReadOnly Property Name() As String
        Get
            Return Me._ClassObject.ObjectName
        End Get
    End Property
    Public Property ClassObject() As Object
        Get
            Return _ClassObject
        End Get
        Set(ByVal value As Object)
            _ClassObject = value
        End Set
    End Property
    Public Property ClassType() As enumClassType
        Get
            Return _ClassType
        End Get
        Set(ByVal value As enumClassType)
            _ClassType = value
        End Set
    End Property
#End Region
End Class
